<?php
    use \Tuanduimao\Loader\App as App;
?>
<div class="block-content remove-margin" style="padding-top:5px;">
    <h2 class="content-heading">小程序余票查询接口</h2>
    <div class="block">
    
    </div>
    <div class="block">
        <div class="block-content  tab-content" style="padding-top:0px;padding-bottom: 20px;">
<pre class="pre-sh"><code class="javascript">

// 详细文档: https://git.oschina.net/xpmjs/xpmjs
// 接口申请地址: https://www.juhe.cn/docs/api/id/173/aid/580
// API源码文件: controller/Ticket.php
...
    var xapp = app.xpm.require('App', 'xapp' );

     xapp.api( 'ticket', 'available' )
     .post({
        'train_date':'2017-01-26',
        'from_station':'BJP',
        'to_station':'SHH'
    })

    .then( function( resp ) {
      console.log('POST RESP:', resp );
    })

    .catch( function( excp ) {
      console.log('POST EXCP:', excp );
    });
...



</code></pre>
            
        </div>
    </div>
</div>


<script type="text/javascript">

$(function(){
    App.initHelpers('highlightjs');

});
</script>


